//
//  ImageButton.m
//  mosad_hw_fin
//
//  Created by wyw on 2021/1/6.
//  Copyright © 2021 student9. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ImageButton.h"
#import "Masonry.h"
@interface ImageButton()

@end
@implementation ImageButton

- (void) addImage:(UIImage*)img{
    UIImageView * image = [[UIImageView alloc] initWithImage:img];
    [self addSubview:image];
    [image mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.centerX.equalTo(self);
    }];
    self.image = image;
}

@end
